<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>盒子模型</title>
    <style>
        /*格式化样式*/
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: black;
        }

        .div01 {
            width: 500px;
            height: 500px;
            background-color: red;
            /*设置外边距*/
            margin: 20px;
            /*设置边框宽度*/
            border: 5px #ffffff solid;
            padding: 40px;
        }

        .div02 {
            width: 250px;
            height: 250px;
            background-color: #F0F000;
            border: 5px #0f0 solid;
            margin: 50px;
        }
        .div03 {
            width: 250px;
            height: 250px;
            background-color: #F0F000;
            border: 5px #0f0 solid;
        }
    </style>
</head>
<body>
    <div class="div01">

        <div class="div02">

        </div>

        <div class="div03">

        </div>


    </div>

</body>
</html>